const fileService = require('../service/file.service')
class FileController {
  async create(ctx,next) {
    const { filename, mimetype, size } = ctx.request.file
    const { id } = ctx.user 

    const result = await fileService.create(filename, mimetype, size, id)

    // 3.将头像的信息放入user表中
    

    ctx.body = {
      code: 0,
      message: '头像上传成功'
    }
  }

}

module.exports = new FileController()
